<!DOCTYPE html>
<html><head>
  <meta charset="utf-8">
  <title>个人中心</title>
  <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="css/mui.min.css">

  <style type="text/css">
   #list {
    /*避免导航边框和列表背景边框重叠，看起来像两条边框似得；*/
    margin-top: -1px;
   }
   .mui-bar .mui-pull-left .mui-icon {
    padding-right: 5px;
    font-size: 28px;
   }
   .mui-bar .mui-btn {
    font-weight: normal;
    font-size: 17px;
   }
   .mui-bar .mui-btn-link {
    top: 1px;
   }
   .mui-scroll { height: 28px; line-height: 28px; overflow: hidden;}
   .mui-scroll a{padding: 5px;}
   .red{color:#FF0000}
   .no{ background-color:#FFFFFF}
   .mui-content-padded {
				margin-top: 25px;
			}
			 .hy-box{background-color:#FFFFFF; padding:10px;}
			 .mui-input-row{margin:5px; padding:10px;}
			 .oauth-area {
				bottom: 20px;
				left: 0px;
				text-align: center;
				width: 100%;
				padding: 0px;
				margin: 0px;
			}
			
			.oauth-area .oauth-btn {
				display: inline-block;
				width: 50px;
				height: 50px;
				background-size: 30px 30px;
				background-position: center center;
				background-repeat: no-repeat;
				margin: 0px 20px;
				/*-webkit-filter: grayscale(100%); */
				border: solid 1px #ddd;
				border-radius: 25px;
			}
			
			.oauth-area .oauth-btn:active {
				border: solid 1px #aaa;
			}
			
			.oauth-area .oauth-btn.disabled {
				background-color: #ddd;
			}
  </style>
 </head>

 <body>
<header id="header" class="mui-bar mui-bar-nav">
  <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
   <h1 class="mui-title" id="mui-title">加载中</h1>
  
</header>
<div style="margin-top:60px;margin-bottom:60px;">
<div class="mui-row"  style="margin-bottom:20px">
        <div class="mui-col-sm-4 mui-col-xs-4">
		<ul class="mui-table-view">
<li class="mui-table-view-cell"><a style="text-align:center" her="fav.html?q=fav"><span class="mui-icon mui-icon-star"></span><br><span class="mui-tab-label">收藏</span></a>
            </li>
			</ul>
        </div>
		 <div class="mui-col-sm-4 mui-col-xs-4">
		 <ul class="mui-table-view" >
            <li class="mui-table-view-cell">
             <a style="text-align:center"  her="fav.html?q=look"><span class="mui-icon mui-icon-refresh"></span><br><span class="mui-tab-label">历史</span></a>
            </li>
			</ul>
        </div>
        <div class="mui-col-sm-4 mui-col-xs-4">
		<ul class="mui-table-view">
            <li class="mui-table-view-cell">
              <a style="text-align:center"  her="fav.html?q=com"><span class="mui-icon mui-icon-chat"></span><br><span class="mui-tab-label">评论</span></a>
            </li>
			</ul>
        </div>


 <div class="mui-col-sm-4 mui-col-xs-4">
		<ul class="mui-table-view">
<li class="mui-table-view-cell"><a style="text-align:center" her="fav.html?posttype=weibo_get&q=fav"><span class="mui-icon mui-icon-star"></span><br><span class="mui-tab-label">微博收藏</span></a>
            </li>
			</ul>
        </div>
		 <div class="mui-col-sm-4 mui-col-xs-4">
		 <ul class="mui-table-view" >
            <li class="mui-table-view-cell">
             <a style="text-align:center"  her="fav.html?posttype=weibo_get&q=look"><span class="mui-icon mui-icon-refresh"></span><br><span class="mui-tab-label">微博历史</span></a>
            </li>
			</ul>
        </div>
        <div class="mui-col-sm-4 mui-col-xs-4">
		<ul class="mui-table-view">
            <li class="mui-table-view-cell">
              <a style="text-align:center"  her="fav.html?posttype=weibo_get&q=com"><span class="mui-icon mui-icon-chat"></span><br><span class="mui-tab-label">微博评论</span></a>
            </li>
			</ul>
        </div>


        <div class="mui-col-sm-4 mui-col-xs-4">
		<ul class="mui-table-view">
<li class="mui-table-view-cell"><a style="text-align:center" her="mx.html"><span class="mui-icon mui-icon-starhalf"></span><br><span class="mui-tab-label red" id="gold">0</span></a>
            </li>
			</ul>
        </div>
		 <div class="mui-col-sm-4 mui-col-xs-4">
		 <ul class="mui-table-view" >
            <li class="mui-table-view-cell">
             <a style="text-align:center" her="cz.html"><span class="mui-icon mui-icon-undo"></span><br><span class="mui-tab-label">充值</span></a>
            </li>
			</ul>
        </div>
        <div class="mui-col-sm-4 mui-col-xs-4">
		<ul class="mui-table-view">
            <li class="mui-table-view-cell">
              <a style="text-align:center" her="huishou"><span class="mui-icon mui-icon-redo"></span><br><span class="mui-tab-label">提现</span></a>
            </li>
			</ul>
        </div>
		 <div class="mui-col-sm-12 mui-col-xs-12">
		<ul class="mui-table-view">
<li class="mui-table-view-cell"><a style="text-align: center;color: #FF3B30;"  her="https://www.ysv8.com/gold/good.html">二千元大奖（涨积分转盘）</a></li>	
			</ul>
		</div>
    </div>
<ul class="mui-reglogin mui-table-view" id="mui-reglogin" style="margin-top: 25px;"></ul>
<ul class="mui-table-view" style="margin-top: 25px;">
<li class="mui-table-view-cell"><a style="text-align: center;" onClick="mui('#lang').popover('toggle');" id="langa"></a></li>	
<li class="mui-table-view-cell"><a style="text-align: center;color: #FF3B30;" onClick="localStorage.clear();mui.alert('清除历史记录成功')">清除历史记录</a></li></ul>			
</div>








<div id="rzdiv" class="mui-popover mui-popover-bottom mui-popover-action">
<div class="hy-box" style="font-size: 16px;">
<form class="mui-input-group">
<div class="mui-input-row"><label>手机号码</label><input id='mobile' type="text" class="mui-input" placeholder="请输入账号"></div>
<a id='yzmb' class="mui-btn mui-btn-block mui-btn-primary">获取验证码</a>
<div class="mui-input-row"><label>验证码</label><input id='yzm' type="text" class="mui-input" placeholder="请输入验证码"></div>
</form>		
<a id='rzb' class="mui-btn mui-btn-block mui-btn-primary">实名认证</a>
</div>	
</div>




<div id="logindiv" class="mui-popover mui-popover-bottom mui-popover-action">
<div class="hy-box" style="font-size: 16px;">
<form class="mui-input-group">
<div class="mui-input-row"><label>账号</label><input id='user' type="text" class="mui-input" placeholder="请输入账号"></div>
<div class="mui-input-row"><label>密码</label><input id='pass1' type="password" class="mui-input" placeholder="请输入密码"></div>
<div class="mui-input-row" id="pass2d"><label>重复密码</label><input id='pass2' type="password" class="mui-input" placeholder="请再次输入密码"></div>	
<div class="mui-input-row" id="emaild"><label>邮箱</label><input id='email' type="text" class="mui-input" placeholder="请输入您的邮箱"></div>	
</form>		
<div class="mui-content-padded"><button id='loginb' class="mui-btn mui-btn-block mui-btn-primary">登录</button><a id='add'>注册账号</a></div>
<div class="mui-content-padded oauth-area"></div>
</div>
</div>	
</div>

<div id="lang" class="mui-popover mui-popover-bottom mui-popover-action ">
<ul class="lang mui-table-view" id="langul"></ul>
    <!-- 取消菜单 -->
    <ul class="mui-table-view">
      <li class="mui-table-view-cell">
        <a onClick="mui('#lang').popover('toggle');"><b>取消</b></a>
      </li>
    </ul>
</div>
<script src="js/mui.min.js"></script>
<script src="config.js"></script>
<script src="js/mui.enterfocus.js"></script>
		<script src="js/app.js"></script>
<script>
mui.init({
		swipeBack:true,
	beforeback: function(){
if(typeof(plus)!="undefined"){ 
		var list = plus.webview.getLaunchWebview();
		list.reload();
		return true;
		}else{
		history.go(-1);location.reload();
		return false;
		}
	}
});
		
var loginButton = document.getElementById('loginb');
var regid='login';
var islogin=false;
document.getElementById('langa').innerHTML+='(<span class="red">'+langtext[lang]+'</span>)';
var langul=document.getElementById('langul');
for (var Key in langtext){
var li = document.createElement('li');
li.className = 'mui-table-view-cell';
li.innerHTML = '<a id="'+Key+'">'+langtext[Key]+'</a>';
langul.appendChild(li);
  }



 function regdiv(){
 if(regid=='login'){
document.getElementById("emaild").style.display="none";
document.getElementById("pass2d").style.display="none";
 }else if(regid=='add'){
 document.getElementById("emaild").style.display="inline";
document.getElementById("pass2d").style.display="inline";
 }
 
 }
function setdata(data){
 var div = document.getElementById("mui-reglogin");  
    while(div.hasChildNodes()){  div.removeChild(div.firstChild);  }  
if(typeof(data['hex'])!="undefined"){ 
	ysv8hex=data['hex'];
 localStorage.setItem("ysv8hex",data['hex']);
 }
if(data['error']){
islogin=true;
if(typeof(data['mygroup'])!="undefined"){ 
if(data['mygroup'].length>0){
data['mygroup'].unshift({name:'问答',id:-1,size:1},{name:'广场',id:0,size:3});
localStorage.setItem("group",JSON.stringify(data['mygroup']));
}
}
document.getElementById('mui-title').innerText=data['my']['user'];
document.getElementById('gold').innerText=data['my']['gold'];
if(data['my']['rz']==0){
	  var li = document.createElement('li');
      li.className = 'mui-table-view-cell';
      li.innerHTML = '<a style="text-align: center;" onClick="mui(\'#rzdiv\').popover(\'toggle\');" id="rza">实名认证</a>';
      div.appendChild(li);	
	   mui('#rzdiv').popover('toggle');  
	  }
   var li = document.createElement('li');
      li.className = 'mui-table-view-cell';
      li.innerHTML = '<a style="text-align: center;color: #FF3B30;" id="out">退出</a>';
      div.appendChild(li);
	  
}else{
islogin=false;
document.getElementById('mui-title').innerText="请登录";
document.getElementById('gold').innerText=0;
 var li = document.createElement('li');
      li.className = 'mui-table-view-cell';
      li.innerHTML = '<a style="text-align: center;color: #FF3B30;" id="regandlog">注册/登录</a>';
      div.appendChild(li);
	  var gethtml=regdiv();
	  mui('#logindiv').popover('toggle');
}

}


mui(".lang").on('tap','a',function(){
id = this.getAttribute("id");
lang=id;
localStorage.setItem("lang",id);
document.getElementById('langa').innerHTML='(<span class="red">'+langtext[lang]+'</span>)';
mui('#lang').popover('toggle');
});


mui("#rzdiv").on('tap','a',function(){
id = this.getAttribute("id");
if(id=='yzmb'){
mui.post('https://www.ysv8.com/open/mobile',{mobile:document.getElementById('mobile').value,YSV8_HEX:ysv8hex},function(data){
 if(!data['error']){
 mui.alert(data['info'])
 }else{
 mui.alert('验证码发送成功')
 }
 });
}
  if(id=="rzb"){
mui.post('https://www.ysv8.com/open/rz',{mobile:document.getElementById('mobile').value,yzm:document.getElementById('yzm').value,YSV8_HEX:ysv8hex},function(data){

 if(!data['error']){
 mui.alert(data['info'])
 }else{
 mui.alert('恭喜您！认证成功')
 mui('#rzdiv').popover('toggle');
 }


 });
  }
  
});



mui(".mui-reglogin").on('tap','a',function(){
id = this.getAttribute("id");
if(id=="regandlog"){
var gethtml=regdiv();
  mui('#logindiv').popover('toggle');
  }
  
  if(id=="out"){
mui.post('https://www.ysv8.com/open/user',{type:'out',YSV8_HEX:ysv8hex},function(data){
 ysv8hex='no';
 localStorage.setItem("ysv8hex",'no');
setdata(data)
 });
  }
  
});
 
mui(".mui-content-padded").on('tap','a',function(){
id = this.getAttribute("id");
var idinner=this.innerText;
this.id=regid;
regid=id;
var gethtml=regdiv();
this.innerText=loginButton.innerText;
loginButton.innerText=idinner;
});	   


mui(".mui-content-padded").on('tap','button',function(){
 mui.post('https://www.ysv8.com/open/user',{user:document.getElementById("user").value,pass1:document.getElementById("pass1").value,pass2:document.getElementById("pass2").value,email:document.getElementById("email").value,type:regid},function(data){
if(typeof(data['hex'])!="undefined"){ 
	ysv8hex=data['hex'];
 localStorage.setItem("ysv8hex",data['hex']);
 }
mui('#logindiv').popover('toggle');
if(!data['error']){
mui.alert(data['info']);
}else{
setTimeout(function() {mui.post('https://www.ysv8.com/open/user',{type:'get',YSV8_HEX:ysv8hex},function(data){setdata(data);});}, 500);
}

 });


});	
  mui(".mui-bar-tab").on('tap','.mui-tab-item',function(){
id = this.getAttribute("her");
if(id!=null){
mui.openWindow({
url: id, 
id:id
});
}
});	   
  mui(".mui-row").on('tap','a',function(){
id = this.getAttribute("her");
if(id=="huishou"){

var mygold=document.getElementById('gold').innerText
if(mygold<15000){
mui.alert('您的金币不足15000','金币不足');
}else{
mui.post('https://www.ysv8.com/user/huishou',{type:'out',YSV8_HEX:ysv8hex},function(data){
if(data['error']==true){
mygold=document.getElementById('gold').innerText=data['gold'];
mui.alert(data.info,'提现成功');
 }else{
mui.alert(data.info,'失败');
 }
 });
}


return false;
}

if(id!=null){
mui.openWindow({
url: id, 
id:'nav'
});
}
});	
(function($) {
	                              


	$.plusReady(function() {
	app.setState(null);
						//第三方登录
						var authBtns = ['weixin', 'sinaweibo', 'qq']; //配置业务支持的第三方登录
						var auths = {};
						var oauthArea = document.querySelector('.oauth-area');
						plus.oauth.getServices(function(services) {
							for (var i in services) {
								var service = services[i];
								auths[service.id] = service;
								if (~authBtns.indexOf(service.id)) {
									var isInstalled = app.isInstalled(service.id);
									var btn = document.createElement('div');
									//如果微信未安装，则为不启用状态
									btn.setAttribute('class', 'oauth-btn' + (!isInstalled && service.id === 'weixin' ? (' disabled') : ''));
									btn.authId = service.id;
									btn.style.backgroundImage = 'url("images/' + service.id + '.png")'
									oauthArea.appendChild(btn);
								}
							}
							$(oauthArea).on('tap', '.oauth-btn', function() {
								if (this.classList.contains('disabled')) {
									plus.nativeUI.toast('您尚未安装微信客户端');
									return;
								}
								var auth = auths[this.authId];
								var waiting = plus.nativeUI.showWaiting();
								auth.login(function() {
									waiting.close();
									plus.nativeUI.toast("登录认证成功");
									auth.getUserInfo(function() {
										plus.nativeUI.toast("获取用户信息成功");
										var name = auth.userInfo.nickname || auth.userInfo.name;
										app.createState(name, function() {
											mui.alert(name);
										});
									}, function(e) {
										plus.nativeUI.toast("获取用户信息失败：" + e.message);
									});
								}, function(e) {
									waiting.close();
									plus.nativeUI.toast("登录认证失败：" + e.message);
								});
							});
						}, function(e) {
							oauthArea.style.display = 'none';
							plus.nativeUI.toast("获取登录认证失败：" + e.message);
						});
	});
$.ready(function() {
setTimeout(function() {mui.post('https://www.ysv8.com/open/user',{type:'get',YSV8_HEX:ysv8hex},function(data){setdata(data);});}, 500);
  });
})(mui);
  </script>
 </body>

</html>